# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-frameworks
pkgname=kpeople
pkgver=6.1.0
pkgrel=0
pkgdesc="A library that provides access to all contacts and the people who hold them"
arch="all !armhf" # armhf blocked by qt6-qtdeclarative
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-or-later"
depends="qt6-qtbase-sqlite"
depends_dev="
	kcontacts-dev
	kcoreaddons-dev
	ki18n-dev
	kitemviews-dev
	kservice-dev
	kwidgetsaddons-dev
	qt6-qtdeclarative-dev
	"
makedepends="$depends_dev
	doxygen
	extra-cmake-modules
	qt6-qttools-dev
	samurai
	"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/frameworks/kpeople.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kpeople-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	# personsmodeltest fails
	ctest --test-dir build --output-on-failure -E '(personsmodeltest)'
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
de745c3d9dcd80dfdb16eeb12dacdad5d77252f3de2ae7957c0635bd39359c39b17d12bb69812a152cfa4ec9e801c0199b1b81cef5ffc3a2586953adf9f56028  kpeople-6.1.0.tar.xz
"
